﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Dapper_Core.BLL.Interface;
using Microsoft.AspNetCore.Mvc;

namespace Dapper_Core.Web.Controllers
{
    public class PropertyInjectionController : Controller
    {
        private IPlayService playService;
        public IPayService PayService { get; set; }
        public PropertyInjectionController(IPlayService playService)
        {
            this.playService = playService;
        }

        public IActionResult Index()
        {
            ViewData["pay"] = PayService.Pay();
            ViewData["play"] = playService.Play();
            return View();
        }
    }
}